interface Father {
    name: string
}

interface People {
    name: string, // 字符串
    age: number, // 数字
    sex: boolean, // 是否
    love: Array<any>,// 数组 Array需要用泛型指定数组内部类型
    mother: object, // 对象
    father: Father, // 对象 对象也可以嵌套ts已声明的类型
    other: any // 任何
}

const people: People = {
    name: 'people',
    age: 18,
    sex: true,
    love: [],
    mother: {},
    father: {name: 'father'},
    other: 'any',
}

console.log(people)


interface IUser {
    name: string;
    age: number;
}

type RecordUser = Record<string, IUser>;

const users: RecordUser = {
    Lily: {
        name: 'Lily',
        age: 18,
    },
    Jack: {
        name: 'Jack',
        age: 19,
    },
}

